Skip to content

[WIP] Add option to only aggregate documentation from selected package versions#107

Draft
kdayday wants to merge 3 commits intoJuliaComputing:mainfrom
kdayday:kd/version-reduction
Draft

[WIP] Add option to only aggregate documentation from selected package versions#107
kdayday wants to merge 3 commits intoJuliaComputing:mainfrom
kdayday:kd/version-reduction

Conversation

@kdayday
Copy link

@kdayday kdayday commented Feb 23, 2026

Summary
Adds optional control over which version directories are copied into the aggregate site and injects a “See All Versions” option in the Documenter version selector that links to the package’s own gh-pages (or a custom URL). Useful when aggregating many repos with long version histories that might exceed Github Page's free 1 GB limit

New MultiDocRef options

  • include_versions (Union{Vector{String}, Nothing}): If set (e.g. ["stable", "dev"]), only these version directories are copied from upstream; root files (e.g. index.html, versions.js) are always copied. Reduces aggregate size when many versions exist.
  • all_versions_url (Union{String, Nothing}): URL for the “See All Versions” link in the version selector when include_versions is set. If unset and giturl is set, it is derived from giturl (e.g. https://github.com/org/pkg.jl.githttps://org.github.io/pkg.jl/).

Behavior
When include_versions is set:

  • Version dirs are copied with follow_symlinks = true so symlinks like stable → v1.0.0 become real directories in the aggregate.
    • versions.js is rewritten so the version selector only lists the kept versions.
    • A small script is injected before </body> in each doc HTML that adds a “See All Versions” option to the version <select>. Choosing it opens the package (or custom) URL in a new tab and restores the dropdown to the current version. Only absolute http(s) URLs are used for this link.
  • When include_versions is unset, behavior is unchanged (full copy, no injection).

@kdayday kdayday changed the title Add option to only aggregate documentation from selected package versions [WIP] Add option to only aggregate documentation from selected package versions Feb 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant